<div class="maintop">
    当前位置：编辑文章
    <a href="javascript:;" action="<?=$basepath?>_edit?id=<?=$data['id']?>" class="mainFrame button">刷新</a>
    <? if(ISDEBUG){ ?>
        <a href="javascript:$('.debuginfo').toggle();" class="button">调试信息</a>
    <? } ?>
</div>
<div class="main">
    <ul class="switchs">
    	<li id="s1">基本</li>
        <li id="s2" class="c">图标</li>
        <li id="s3" class="c">内容</li>
    </ul>
    <form name="category_add_save" action="<?=$basepath?>_edit_save" method="POST" target="ajax" func="form_submit">
        <input type="hidden" name="id" value="<?=$data['id']?>" />
    <div class="info">
        <div id="infos1">
        	<? $this->display('editor',array(
                'textareaid'=>'content',
                'uploadbutton'=>'uploadbutton',
                'inputid'=>'icon',
                'uploadbutton1'=>'uploadbutton1',
                'inputid1'=>'icon1',
                'uploadbutton2'=>'uploadbutton2',
                'inputid2'=>'icon2',
                'loadjsandcss'=>true)); ?>
            	<dl><dt>标题：</dt><dd><input type="text" name="title" class="wtxt" value="<?=$data['title'] ?>" /></dd></dl>
                <dl><dt>分类：</dt><dd><select type="text" name="category">
                    <?php
						if($category){
							foreach($category as $k=>$v){
								echo '<option value="'.$k.'" '.($k==$data['category'] ? 'selected="selected"' : '').'>'.$v.'</option>';
							}
						}
					?>
                        </select></dd><dt>小类：</dt><dd><input type="text" name="subtitle" class="int" value="<?=$data['subtitle']?>" /> </dd></dl>
                <dl><dt>简介：</dt><dd><input type="text" name="explain" class="wtxt" value="<?=$data['explain'] ?>" /></dd></dl>
                <dl><dt>链接：</dt><dd><input type="text" name="url" class="int" value="<?=$data['url'] ?>" /></dd><dd class="t">不为 # 时，系统将直接链接到此址</dd></dl>
                <dl><dt>日期：</dt><dd><input type="text" name="actiontime" class="int" value="<?=date('Y-m-d H:i:s',$data['actiontime']) ?>" /></dd><dd class="t">当前文章的发布日期时间</dd></dl>
            <dl><dt>有效期：</dt><dd><input type="text" name="validity" class="int" value="<?=$data['validity'] ?>" /> </dd></dl>
            <dl><dt>阅读：</dt><dd><input type="text" name="reading" class="int" value="<?=$data['reading'] ?>" /></dd><dd class="t">当前文章用户的阅读数量</dd></dl>
                <dl><dt>排序：</dt><dd><input type="text" name="sort" class="int" value="<?=$data['sort'] ?>" /></dd><dd class="t">按0,1,2,3的顺序排序</dd></dl>
            <dl><dt>登录：</dt><dd><select name="mastlogin">
                        <option value="0"<?=(intval($data['mastlogin'])==0 ? ' selected="selected"' : '') ?>>不需要登录即可查看</option>
                        <option value="1"<?=(intval($data['mastlogin'])==1 ? ' selected="selected"' : '') ?>>需要登录后查看</option>
                    </select></dd></dl>
            <dl><dt>状态：</dt><dd><select name="state">
                	<option value="0"<?=(intval($data['state'])==0 ? ' selected="selected"' : '') ?>>禁用</option>
                    <option value="1"<?=(intval($data['state'])==1 ? ' selected="selected"' : '') ?>>启用</option>
                </select></dd></dl>
        </div>
        <div id="infos2" class="hide">
            <dl><dt>图标1：</dt><dd><input type="text" name="icon" id="icon" class="wtxt" value="<?=$data['icon'] ?>" /></dd><dd><input type="button" name="uploadbutton" id="uploadbutton" value="选择" /></dd></dl>
            <dl><dt>图标2：</dt><dd><input type="text" name="icon1" id="icon1" class="wtxt" value="<?=$data['icon1'] ?>" /></dd><dd><input type="button" name="uploadbutton1" id="uploadbutton1" value="选择" /></dd></dl>
            <dl><dt>图标3：</dt><dd><input type="text" name="icon2" id="icon2" class="wtxt" value="<?=$data['icon2'] ?>" /></dd><dd><input type="button" name="uploadbutton2" id="uploadbutton2" value="选择" /></dd></dl>
            <dl><dt>图标展示：</dt><dd>
                <label><input type="radio" name="isbig" value="0"<?=(intval($data['isbig'])==0 ? ' checked="checked"' : '') ?> />正常</label>
                <label><input type="radio" name="isbig" value="1"<?=(intval($data['isbig'])==1 ? ' checked="checked"' : '') ?> />大图</label>
            </dd></dl>
        </div>
        <div id="infos3" class="hide">
                <dl><dd><textarea id="content" name="content" cols="80" rows="3" style="width:1000px;height:360px;" class="wtxt"><?=(isset($content['content']) ? $content['content'] : '') ?></textarea></dd></dl>
        </div>
        <dl><dt>&nbsp;</dt><dd>
                <input type="submit" value="保存" class="btnbig" />
                <a href="javascript:;" action="<?=$basepath?>" class="mainFrame btnbig">返回</a>
        </dd></dl>
    </div>

    </form>
</div>